import {
  setUserNick
} from '../../../api/user';
Page({
  data: {
    nameValue: '',
  },
  onLoad(options) {
    const {
      name
    } = options;
    this.setData({
      nameValue: name,
    });
  },
  onSubmit() {
    setUserNick({
      "nickname": this.data.nameValue
    }).then(res => {
      wx.navigateBack({
        backRefresh: false
      });
    })

  },
  clearContent() {
    this.setData({
      nameValue: '',
    });
  },
  onClose() {
    console.log("关闭")
  }
});